package com.ntv.persistent.event;

import java.sql.ResultSet;
import java.sql.SQLException;
import org.springframework.jdbc.core.RowMapper;
import com.ntv.domain.Event;
import com.ntv.domain.IEvent;

public class EventRowMapper implements RowMapper {

	public Object mapRow(ResultSet rs, int idx) throws SQLException {

		IEvent event = new Event();
		event.setEventId(rs.getLong("event_id"));
		event.setEventStartTime(rs.getString("event_start_time"));
		event.setEventDate(rs.getDate("event_date"));
		event.setEventName(rs.getString("event_name"));
		event.setEventCategory(rs.getString("event_category"));
		event.setCreatedBy(rs.getLong("created_by"));
		event.setCreatedDate(rs.getDate("created_date"));
		event.setUpdatedBy(rs.getLong("updated_by"));
		event.setUpdatedDate(rs.getDate("updated_date"));

		return event;
	}

}
